{include file='admin/header.html'}

<form class="layui-form i18n" style="overflow: hidden;" action="">
    <fieldset class="layui-elem-field layui-field-title"><legend>{$localize.i18n}</legend></fieldset>
    {if $langs}
    <div class="layui-row">
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">{$tran.language}</label>
                    <div class="layui-input-block">
                        <select name="sl" lay-filter="i18nsltl" lay-verify="required" disabled="disabled">
                            {foreach from="$langs" item="_lang"}
                            <option value="{$_lang.slug}" data-voice="{$_lang.voice}" {if $_lang.slug=='zh-CN'} selected="selected"{/if} disabled="disabled">{$_lang.name}（{$_lang.title}）</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline">
                        <select name="tl" lay-filter="i18nsltl" lay-verify="required">
                            {foreach from="$langs" item="_lang"}
                            <option value="{$_lang.slug}" data-voice="{$_lang.voice}" {if $_lang.slug=='co'} selected="selected"{/if} {if !in_array($_lang.slug, $lang_slugs) || $_lang.slug=='zh-TW'} disabled="disabled"{/if}>{$_lang.name}（{$_lang.title}）</option>
                            {/foreach}
                        </select>
                    </div>
                    <div class="layui-form-mid" style="padding: 0 !important;">
                        <button type="button" class="layui-btn layui-btn-normal" lay-active="googleTranslate"><i class="layui-icon layui-icon-fonts-clear"></i> {$tran.translate}</button>
                        <span id="chk-loading" style="margin-left: 10px;" class="layui-hide"><i class="layui-icon layui-icon-loading-1 layui-anim layui-anim-rotate layui-anim-loop"></i></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {/if}
    <div class="layui-row">
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label class="layui-form-label" style="padding: 0 15px;">
                    <textarea disabled="disabled" style="background-color: inherit;border: none;resize: none;overflow: hidden;text-align: right;" rows="20" class="layui-textarea">1</textarea>
                </label>
                <div class="layui-input-block">
                    <textarea name="q" style="white-space: pre;" placeholder="{$tran.language_pack} ..." rows="20" required readonly lay-verify="required" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="layui-form-label"></label>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">{$tran.lines} 1</div>
                    <div class="layui-form-mid speak-voice speak-sl-voice" style="float: right;">
                        <button type="button" class="layui-btn layui-btn-primary layui-btn-xs layui-btn-radius layui-icon layui-icon-speaker"></button>
                    </div>
                    <div class="layui-clear"></div>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label class="layui-form-label" style="padding: 0 15px;">
                    <textarea disabled="disabled" style="background-color: inherit;border: none;resize: none;overflow: hidden;text-align: right;" rows="20" class="layui-textarea">1</textarea>
                </label>
                <div class="layui-input-block">
                    <textarea name="to" style="white-space: pre;" placeholder="" rows="20" required lay-verify="required" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="layui-form-label"></label>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">{$tran.lines} 1</div>
                    <div class="layui-form-mid speak-voice speak-tl-voice" style="float: right;">
                        <button type="button" class="layui-btn layui-btn-primary layui-btn-xs layui-btn-radius layui-icon layui-icon-speaker"></button>
                    </div>
                    <div class="layui-clear"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label for="layui-form-label"></label>
                <div class="layui-input-block"></div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label for="layui-form-label"></label>
                <div class="layui-input-block">
                    <input type="checkbox" title="{$tran.auto}" lay-skin="primary" lay-filter="auto-db">
                    <button type="button" class="layui-btn" lay-filter="generate" lay-submit="">{$tran.save}</button>
                    <button type="reset" class="layui-btn layui-btn-primary">{$tran.reset}</button>
                    <button type="button" class="layui-btn layui-btn-danger" lay-active="pos_empty_line">{$tran.position}</button>
                    <button type="button" class="layui-btn layui-btn-warm" lay-active="select_fill">{$tran.fill}</button>
                </div>
            </div>
        </div>
    </div>
</form>

{include file='admin/inc/form.html'}

{include file='admin/footer.html'}